﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;

namespace RCSnake
	{
	class BodyBlock : Shape
		{
		/*---------------------------------------------*\
		|*                 Attributs                   *|
		\*---------------------------------------------*/
		private Snake m_snake;
		private BodyBlock m_frontBodyBlock;
		/*---------------------------------------------*\
		|*                Constructeur                 *|
		\*---------------------------------------------*/
		public BodyBlock(Area area, Snake snake, BodyBlock frontBodyBlock, Size size, Point position)
			: base(area, size, position)
			{
			m_img = Image.FromHbitmap(Properties.Resources.snake_texture.GetHbitmap());
			m_snake = snake;
			m_frontBodyBlock = frontBodyBlock;
			}
		/*---------------------------------------------*\
		|*               Methodes public               *|
		\*---------------------------------------------*/
		/*---------------------*\
		|*      get / set      *|
		\*---------------------*/
		public Snake snake
			{
			get { return m_snake; }
			}

		public BodyBlock frontBodyBlock
			{
			get { return m_frontBodyBlock; }
			set { m_frontBodyBlock = value; }
			}
		}
	}
